// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env:"cjw12138-4gb2o61v4b4636ac"
})

const db = cloud.database();

// 云函数入口函数
exports.main = async (event, context) => {
  var id = event.id
  console.log(id)
  return await db.collection('articles').where({
    _id: id
  }).remove().then(res=>{
    console.log(res)
  })
}